package com.test.demo.security.utils;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class PasswordGenerator {
    public static void main(String[] args) {
        BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();

        // 生成新密码的哈希值
        String newPassword = "123456"; // 您想要设置的新密码
        String hashedPassword = encoder.encode(newPassword);

        System.out.println("新密码: " + newPassword);
        System.out.println("BCrypt哈希: " + hashedPassword);
    }
}
